using System;
using System.IO;
using System.Collections;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.ComponentModel.Design.Serialization;

using System.Drawing;
using System.Drawing.Printing;
using System.Drawing.Design;
using System.Windows.Forms;
using System.Windows.Forms.Design;
using System.Reflection;
using System.CodeDom;

using Camalon.Drawing;


namespace Camalon.Drawing.Design
{

	/// <summary>
	/// ShapeContainerRootDesigner is the user interface we present to users when they
	/// create a new shape container.  Individual shapes can be visually designed
	/// on this container.  We also add a toolbox item filter to the class definition
	/// that requires any toolbox items to have the filter name of
	/// "Microsoft.Samples.ShapeLibrary.Shape". We also define this filter name
	/// in the Shape base class.  This disables all toolbox items that are not derived
	/// from Shape.
	/// </summary>
	[ToolboxItemFilter("Camalon.Drawing.Shape", ToolboxItemFilterType.Allow)]//Require
	public class ShapeContainerRootDesigner: ShapeContainerRootDesignerBase
	{


		#region Design-Time Poperties



		#region ShapeContainer
		
		[DesignOnly( true )]
		[ReadOnly( true )]
		[Browsable( false)]
		[EditorBrowsable( EditorBrowsableState.Never )]
		[DesignerSerializationVisibility( DesignerSerializationVisibility.Hidden)]
		[Category("Transformation")]
		public int Rotation
		{
			get
			{
				return 0;
			}
		}

		[DesignOnly( true )]
		[ReadOnly( true )]
		[Browsable( false)]
		[EditorBrowsable( EditorBrowsableState.Never )]
		[DesignerSerializationVisibility( DesignerSerializationVisibility.Hidden)]
		[Category("Transformation")]
		public Warp Warp
		{
			get{ return Warp.Empty;}
		}

		[DesignOnly( true )]
		[ReadOnly( true )]
		[Browsable( false)]
		[EditorBrowsable( EditorBrowsableState.Never )]
		[DesignerSerializationVisibility( DesignerSerializationVisibility.Hidden)]
		[Category("Transformation")]
		public Scale Scale
		{
			get
			{
				return Scale.Empty;
			}
		}


		[DesignOnly( true )]
		[ReadOnly( true )]
		[Browsable( false)]
		[EditorBrowsable( EditorBrowsableState.Never )]
		[DesignerSerializationVisibility( DesignerSerializationVisibility.Hidden)]
		[Category("Transformation")]
		public Shear Shear
		{
			get
			{
				return Shear.Empty;
			}
		}


		[DesignOnly( true )]
		[ReadOnly( true )]
		[Browsable( false)]
		[EditorBrowsable( EditorBrowsableState.Never )]
		[DesignerSerializationVisibility( DesignerSerializationVisibility.Hidden)]
		[Category("Style")]
		public Outline Outline
		{
			get
			{
				return null;
			}
		}


		[DesignOnly( true )]
		[ReadOnly( true )]
		[Browsable( false)]
		[EditorBrowsable( EditorBrowsableState.Never )]
		[DesignerSerializationVisibility( DesignerSerializationVisibility.Hidden)]
		[Category("Transformation")]
		public Size ScalingResizeBase
		{
			get{ return this.ShapeContainer.ScalingResizeBase;}
		}


		[DesignOnly( true )]
		[ReadOnly( true )]
		[Browsable( false)]
		[EditorBrowsable( EditorBrowsableState.Never )]
		[DesignerSerializationVisibility( DesignerSerializationVisibility.Hidden)]
		[Category("Transformation")]
		public bool ScalingResize
		{
			get{ return false;}
		}




		#endregion ShapeContainer


		#endregion Design-Time Poperties

		#region Overrides

		protected override void PreFilterProperties(IDictionary properties)
		{
			
			base.PreFilterProperties (properties);
	

			properties["Warp"] = TypeDescriptor.CreateProperty(
				typeof(ShapeContainerRootDesigner), 
				"Warp", 
				typeof(Warp));

			properties["Rotation"] = TypeDescriptor.CreateProperty(
				typeof(ShapeContainerRootDesigner), 
				"Rotation", 
				typeof(int));

			properties["Scale"] = TypeDescriptor.CreateProperty(
				typeof(ShapeContainerRootDesigner), 
				"Scale", 
				typeof(Scale));

			properties["Shear"] = TypeDescriptor.CreateProperty(
				typeof(ShapeContainerRootDesigner), 
				"Shear", 
				typeof(Shear));

			properties["ScalingResizeBase"] = TypeDescriptor.CreateProperty(
				typeof(ShapeContainerRootDesigner), 
				"ScalingResizeBase", 
				typeof(Size));

			properties["ScalingResize"] = TypeDescriptor.CreateProperty(
				typeof(ShapeContainerRootDesigner), 
				"ScalingResize", 
				typeof(bool));

			properties["Outline"] = TypeDescriptor.CreateProperty(
				typeof(ShapeContainerRootDesigner), 
				"Outline", 
				typeof(Outline));


//			if( !this.ShapeContainer.CanEditPoints )
//				properties["Points"] = TypeDescriptor.CreateProperty(
//					typeof(ShapeContainerRootDesigner), 
//					"Points", 
//					typeof(FPoint[]));


		}


		



		
		#endregion Overrides


	}


		
}
